package com.ancy.manager;

import com.ancy.common.ICommon;

import android.content.Context;
import android.content.SharedPreferences;

public class PreferenceManager implements ICommon {
	public static void saveData(Context context, String pattern, String toSave) {
		SharedPreferences preferences;
		preferences = context.getSharedPreferences(PREF, Context.MODE_PRIVATE);
		preferences.edit().putString(pattern, toSave).commit();
	}

	public static String getData(Context context, String pattern) {
		SharedPreferences preferences;
		preferences = context.getSharedPreferences(PREF, Context.MODE_PRIVATE);
		String update = preferences.getString(pattern, "");
		return update;
	}
}
